# NOTE:
# I am a fucker builder, I don't provide any safe PKGBUILD
# and I always install to /usr/local/bin/ 

# must define
pkgname=fy
pkgrel=1
pkgver=0.0.1
pkgdesc="go translate tool fy"
arch=('x86_64') #this is an array
license=('MIT') #this is an array
sha512sums=('SKIP')
depends=('go')

# NOTE: make sure this source is not dead
source=("https://gitee.com/nidielaila/mocking-a-fy/releases/download/fy.tar.gz/fy.tar.gz")

build() {
  #default in dir src
  echo "NOTE: +++++++++++++++++" ${PWD}
  # I not using $srcdir
  
  cd ..
  echo "NOTE: +++++++++++++++++" ${PWD}
  rm -rf pkg src
  #rm -rf pkg src
  tar xvfz fy.tar.gz
  make build  
  mkdir pkg src
}

package() {
  
  echo "NOTE: +++++++++++++++++++++" ${PWD}
  cd ..
  sudo cp fy /usr/local/bin/fy 
}

